#!/bin/bash
git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain
git submodule update --init --recursive 
export RISCV="/opt/riscv"
export PATH=$RISCV/bin:$PATH
./configure --prefix="${RISCV}"
sudo make -j$(nproc)
cd ..
riscv64-unknown-elf-gcc -v
